export interface AnalysisRequest {
  marketData: any;
  accountInfo: any;
  positions: any[];
  klineData: any[];
  role: TradingRole;
}

export interface AnalysisResponse {
  role: TradingRole;
  analysis: string;
  recommendation: TradingRecommendation;
  confidence: number;
  reasoning: string;
  timestamp: number;
}

export interface TradingRecommendation {
  action: 'BUY' | 'SELL' | 'HOLD' | 'CLOSE';
  quantity?: number;
  price?: number;
  stopLoss?: number;
  takeProfit?: number;
  leverage?: number;
  urgency: 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL';
}

export interface ConsensusDecision {
  finalAction: 'BUY' | 'SELL' | 'HOLD' | 'CLOSE';
  quantity: number;
  price?: number;
  stopLoss?: number;
  takeProfit?: number;
  leverage?: number;
  confidence: number;
  reasoning: string;
  participatingRoles: TradingRole[];
  timestamp: number;
}

export enum TradingRole {
  TECHNICAL_ANALYST = 'technical_analyst',
  FUNDAMENTAL_ANALYST = 'fundamental_analyst',
  RISK_MANAGER = 'risk_manager',
  NEWS_ANALYST = 'news_analyst',
  EXECUTION_OFFICER = 'execution_officer',
}

export interface RolePrompt {
  role: TradingRole;
  systemPrompt: string;
  analysisPrompt: string;
}